package com.ac.app.web.form;

import java.util.Date;
import java.util.List;

import com.ac.app.dm.PickRecord;
import com.caac.core.config.Config;
import com.caac.core.util.DateUtils;
import com.caac.core.web.form.BaseForm;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright AgileCentury 2008</p>
 * <p>Company: AgileCentury </p>
 * @author <a href="mailto:ac@agilecentury.com">Agile</a>
 * @version 1.0
 */

public class PkRecordForm extends BaseForm {
    private static final long serialVersionUID = 1L;
    private PickRecord pickRecord;
    private String pubDate;
    private String pickTime;
    private String title;
    private String content;
    private String kwdCon;
    private String subName;
    private String srcName;
    private String publisher;
    private String author;

    private List subjects;
    private String[] subs;

    public PkRecordForm() {
        subjects = Config.getInstance().getSubjects().getChildren();
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public PickRecord getPickRecord() {
        return pickRecord;
    }

    public void setPickRecord(PickRecord pickRecord) {
        this.pickRecord = pickRecord;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getKwdCon() {
        return kwdCon;
    }

    public void setKwdCon(String kwdCon) {
        this.kwdCon = kwdCon;
    }

    public String getSrcName() {
        return srcName;
    }

    public void setSrcName(String srcName) {
        this.srcName = srcName;
    }

    public String getSubName() {
        return subName;
    }

    public void setSubName(String subName) {
        this.subName = subName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPubDate() {
        return pubDate;
    }

    public void setPubDate(String pubDate) {
        this.pubDate = pubDate;
    }

    public String getPickTime() {
        return pickTime;
    }

    public void setPickTime(String pickTime) {
        this.pickTime = pickTime;
    }

    public Date getTime1() {
        try {
            return DateUtils.convertToDate("yyyy-MM-dd", this.pubDate);
        } catch (Exception e) {
            return null;
        }
    }

    public Date getTime2() {
        try {
            return DateUtils.convertToDate("yyyy-MM-dd", this.pickTime);
        } catch (Exception e) {
            return null;
        }
    }

    public List getSubjects() {
        return subjects;
    }

    public void setSubjects(List subjects) {
        this.subjects = subjects;
    }

    public String[] getSubs() {
        return subs;
    }

    public void setSubs(String[] subs) {
        this.subs = subs;
    }
}
